home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Template / c / Delete < prev    next >
Text File  |  1994-04-24  |  1KB  |  38 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Template.Delete.c
  12.     Author:  Copyright © 1992, 1993, 1994 Jason Williams
  13.              Thanks to John Winters for supplying the code that I hacked
  14.              changed, hacked, rewrote, and then wrote again from scratch!
  15.     Version: 1.11 (24 Apr 1994)
  16.     Purpose: Loading, cacheing, and retrieval of window templates
  17. */
  18.  
  19. #include "TempDefs.h"
  20.  
  21.  
  22. extern void Template_Delete(char *name)
  23. /* Attempts to delete the named template, and deallocate it's memory */
  24. {
  25.   template_record *t;
  26.  
  27.   t = Template__FindTemplate(name);
  28.   if (t == NULL)
  29.     return;
  30.  
  31.   free(&(t->windowdef));
  32.   free(t->indirectdata);
  33.  
  34.   LinkList_Unlink(&template_list, &(t->header));
  35.  
  36.   free(t);
  37. }
  38.